#region using

using System;
using System.Data;
using System.Text.RegularExpressions;
using BlogEngine.Core;
using BlogEngine.Core.Web.Controls;

#endregion

/// <summary>
/// Settings for the Flickr Custom Control
/// </summary>
[Extension("Settings for the Flickr Custom Control", "0.1", "<a href=\"http://codeplex.com/blogengineflickr\">Jonas Andersson</a>")]
public class Flickr
{
    static protected ExtensionSettings _settings = null;

    public Flickr()
    {
        // create settings object. You need to pass exactly your
        // extension class name (case sencitive)
        ExtensionSettings settings = new ExtensionSettings("Flickr");
       
        //settings.AddParameter("userid", "User ID", 11, true, true);
        //settings.AddParameter("images", "Number of images", 20, false);
        //settings.AddParameter("style", "CSS Style", 150, false);
        //settings.AddParameter("heightwidth", "Height and width");
        //settings.IsScalar = true;

        settings.AddParameter("userid", "User ID", 12, true, true);
        settings.AddParameter("images", "Number of images", 20, false);
        settings.AddParameter("style", "CSS Style", 150, false);
        settings.AddParameter("heightwidth", "Height and width");
        settings.AddParameter("apikey", "API-key", 32, true);
        settings.AddParameter("secret", "Secret key", 16, true);
        settings.AddParameter("visittext", "\"Visit my page\"-text");
        settings.IsScalar = true;

        settings.UpdateScalarValue("userid", "12345678@N00");
        settings.UpdateScalarValue("apikey", "0123456789abcdef0123456789abcdef");
        settings.UpdateScalarValue("secret", "0123456789abcdef");

        // describe specific rules for entering parameters
        settings.Help = "Settings for the Flickr Custom Control";
        //------------------------------------------------------
        ExtensionManager.ImportSettings(settings);
        _settings = ExtensionManager.GetSettings("Flickr");
    }
}